package interfaz;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;
import javax.swing.SwingUtilities;

import conjunto.LasPalmasPrin;



/**
*esta clase es una ventana que se abre cuando pulsan el boton 
*consultar item propietario/arrendatario tiene dos metodos
* que hacen la accion de consultar y el otro de cancelar la consulta
*@author David giraldo
*@author Diego sanchez
*@version 1.0 26/05/2013
*/
public class VentanaPropiArrend extends javax.swing.JFrame implements ActionListener 
{
    private LasPalmasPrin interfPrincipal;
    private JPanel jPanelAptoProp;
    private JButton jBCancelarConsProp;
    private JButton jBConsultarProp;
    private JLabel jLResultadoPropi;
    private JLabel jLTituloResultadoPro;
    private JPanel jPanelResultadoApPro;
    private JComboBox jCombBAptoPro;
    private JComboBox jCombBPisoPro;
    private JPanel jPanelPisoPropi;
    private JComboBox jCombBloquePropieta;
    private JPanel jPBloqueConsultaPropie;
    private JLabel jLabelTituloBuscarPropi;
	/**
	* 
	*/
		
	public VentanaPropiArrend() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			getContentPane().setBackground(new java.awt.Color(196,196,255));
			{
				jLabelTituloBuscarPropi = new JLabel();
				getContentPane().add(jLabelTituloBuscarPropi);
				jLabelTituloBuscarPropi.setText("SELECCIONE EL NUMERO DE APARTAMENTO");
				jLabelTituloBuscarPropi.setFont(new Font("Georgia",1,12));
				jLabelTituloBuscarPropi.setBounds(114, 24, 357, 31);
				jLabelTituloBuscarPropi.setHorizontalAlignment(SwingConstants.CENTER);
			}
			{
				jPBloqueConsultaPropie = new JPanel();
				getContentPane().add(jPBloqueConsultaPropie);
				jPBloqueConsultaPropie.setBounds(28, 93, 159, 70);
				jPBloqueConsultaPropie.setBorder(BorderFactory.createTitledBorder(null, "BLOQUE", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial Rounded MT Bold",0,12)));
				jPBloqueConsultaPropie.setBackground(new java.awt.Color(155,155,255));
				jPBloqueConsultaPropie.setLayout(null);
				{
					ComboBoxModel jCombBloquePropietaModel = 
							new DefaultComboBoxModel(
									new String[] { "BLOQUE 1", "BLOQUE 2","BLOQUE 3","BLOQUE 4","BLOQUE 5","BLOQUE 6" });
					jCombBloquePropieta = new JComboBox();
					jPBloqueConsultaPropie.add(jCombBloquePropieta);
					jCombBloquePropieta.setModel(jCombBloquePropietaModel);
					jCombBloquePropieta.setBounds(17, 29, 125, 23);
				}
			}
			{
				jPanelPisoPropi = new JPanel();
				getContentPane().add(jPanelPisoPropi);
				jPanelPisoPropi.setBounds(211, 93, 139, 70);
				jPanelPisoPropi.setLayout(null);
				jPanelPisoPropi.setBorder(BorderFactory.createTitledBorder(null, "PISO", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial Rounded MT Bold",0,12)));
				jPanelPisoPropi.setBackground(new java.awt.Color(155,155,255));
				{
					ComboBoxModel jCombBPisoProModel = 
							new DefaultComboBoxModel(
									new String[] { "PISO 1", "PISO 2","PISO 3","PISO 4","PISO 5" });
					jCombBPisoPro = new JComboBox();
					jPanelPisoPropi.add(jCombBPisoPro);
					jCombBPisoPro.setModel(jCombBPisoProModel);
					jCombBPisoPro.setBounds(11, 29, 118, 24);
				}
			}
			{
				jPanelAptoProp = new JPanel();
				getContentPane().add(jPanelAptoProp);
				jPanelAptoProp.setBounds(383, 93, 138, 70);
				jPanelAptoProp.setLayout(null);
				jPanelAptoProp.setBorder(BorderFactory.createTitledBorder(null, "APTO", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial Rounded MT Bold",0,12)));
				jPanelAptoProp.setBackground(new java.awt.Color(155,155,255));
				{
					ComboBoxModel jCombBAptoProModel = 
							new DefaultComboBoxModel(
									new String[] { "APTO 1", "APTO 2","APTO 3","APTO 4" });
					jCombBAptoPro = new JComboBox();
					jPanelAptoProp.add(jCombBAptoPro);
					jCombBAptoPro.setModel(jCombBAptoProModel);
					jCombBAptoPro.setBounds(12, 29, 114, 24);
				}
			}
			{
				jPanelResultadoApPro = new JPanel();
				getContentPane().add(jPanelResultadoApPro);
				jPanelResultadoApPro.setBounds(0, 206, 558, 156);
				jPanelResultadoApPro.setLayout(null);
				jPanelResultadoApPro.setBackground(new java.awt.Color(155,155,255));
				{
					jLTituloResultadoPro = new JLabel();
					jPanelResultadoApPro.add(jLTituloResultadoPro);
					jLTituloResultadoPro.setText("El habitante es :");
					jLTituloResultadoPro.setFont(new Font("Arial black",0,12));
					jLTituloResultadoPro.setBounds(17, 19, 145, 31);
				}
				{
					jLResultadoPropi = new JLabel();
					jPanelResultadoApPro.add(jLResultadoPropi);
					jLResultadoPropi.setBounds(174, 12, 180, 38);
					jLResultadoPropi.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
				}
				{
					jBConsultarProp = new JButton();
					jPanelResultadoApPro.add(jBConsultarProp);
					jBConsultarProp.setText("CONSULTAR");
					jBConsultarProp.setBounds(66, 76, 128, 48);
					jBConsultarProp.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							jBConsultarPropActionPerformed(evt);
						}
					});
				}
				{
					jBCancelarConsProp = new JButton();
					jPanelResultadoApPro.add(jBCancelarConsProp);
					jBCancelarConsProp.setText("CANCELAR!");
					jBCancelarConsProp.setBounds(345, 76, 117, 48);
					jBCancelarConsProp.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							jBCancelarConsPropActionPerformed(evt);
						}
					});
				}
			}
			pack();
			this.setSize(574, 400);
		} catch (Exception e) {
		    
			e.printStackTrace();
		}
	}

	public void actionPerformed(ActionEvent e) 
	{
		
		
	}
	
	private void jBConsultarPropActionPerformed(ActionEvent evt)
	{
		
	}
	
	private void jBCancelarConsPropActionPerformed(ActionEvent evt)
	{
		setVisible(false);
		
	}

}
